public class Text3 {
    public static void dailyTemperatures() {
        int[] temperatures = {73,74,75,71,69,72,76,73};
        int p1 = 0;
        int p2 = 1;
        int[] tmp = new int[temperatures.length];
        while(p1 < tmp.length - 1 && p2 < tmp.length && p1 < tmp.length - 1) {
            int count = 0;
            while(temperatures[p1] < temperatures[p2] && p2 < tmp.length && p1 < tmp.length - 1) {
                count++;
                p2++;
            }
            //这里出来代表 找到p1之后天气高的天数了
            tmp[p1] = count;
            p1++;
            p2 = p1 + 1;
        }
        System.out.println(temperatures);
    }

    public static void main(String[] args) {
        dailyTemperatures();
    }
}
